﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Model.Answer>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Chi tiết
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Header" runat="server">
	Menu
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Toolbar" runat="server">
	<%= Html.Toolbar("Sửa", string.Format("/Answer/Edit/{0}", Model.ID), "edit")%>
	<%= Html.Toolbar("Xóa", string.Format("/Answer/Delete/{0}", Model.ID), "delete")%>
	<%= Html.Toolbar("Quay lại", "/Answer", "back")%>
</asp:Content>

<asp:Content ID="Content6" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>  
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%if(ViewData["MessageInfo"]==null){ %>
	<fieldset>
		<legend>Chi tiết</legend>
		<table class="admintable">
			<tbody><tr>
				<td class="key"> Nội dung câu trả lời</td>
				<td><%= Model.Answers %></td>
			</tr>
			<tr>
				<td class="key">Ngày gửi</td>
				<td><%= Model.AddDate.ToString("dd/MM/yyyy") %></td>
			</tr>
			<tr>
				<td class="key"> Người gửi</td>
				<td><%= Html.Encode(Model.AnswerName) %></td>
			</tr>
			<tr>
				<td class="key">Email</td>
				<td><%= Html.Encode(Model.AnswerEmail) %></td>
			</tr>
			<tr>
				<td class="key"> Trạng thái</td>
				<td> <img style="cursor: pointer;" alt="" id="imgPubYN_<%= Model.ID %>" onclick="ChangePubYN(<%= Model.ID %>);" value="<%= Model.PubYN.Value %>"
                        src="<%= Model.PubYN.HasValue && Model.PubYN.Value ? "/Images/icon-32-apply.png" : "/Images/icon-32-cancel.png" %>" /></td>
			</tr>
			<tr>
				<td class="key">Cập nhật lúc</td>
				<td><%= Html.Encode(String.Format("{0:g}", Model.AddDate)) %></td>
			</tr></tbody>
		 </table>
	 </fieldset>
<% } %>
</asp:Content>

